<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>GameEngine: C:/Users/Axel/Desktop/informatica/Projects/Workspace C++/Game Engine/src/CoreSystems/Gameloop.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">GameEngine
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('_gameloop_8h_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Macros</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">Gameloop.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_gameloop_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#ifndef GAMELOOP_H_</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define GAMELOOP_H_</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_window_8h.html">Window.h</a>&quot;</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;</div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#include &lt;GL/glew.h&gt;</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#include &lt;glfw3.h&gt;</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor">#include &lt;ctime&gt;</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_state_machine_8h.html">StateMachine.h</a>&quot;</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_state_manager_8h.html">StateManager.h</a>&quot;</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_load_shader_8h.html">LoadShader.h</a>&quot;</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;</div>
<div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="class_gameloop.html">   23</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_gameloop.html">Gameloop</a> {</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;    <a class="code" href="class_gameloop.html#a18f9a1686565e206b40718ed787aeb97">Gameloop</a>();</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="class_gameloop.html#ac0aff9533f00b23557a7d7b348b95007">~Gameloop</a>();</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_gameloop.html#aaf57f38f17343877c7b4bd6a75ef3a9f">gameLoop</a>();</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="class_gameloop.html#abf8e7512d69339437c10cfb24be80de2">   34</a></span>&#160;    <a class="code" href="class_window.html">Window</a>* <a class="code" href="class_gameloop.html#abf8e7512d69339437c10cfb24be80de2">window</a>;</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;</div>
<div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="class_gameloop.html#a301c183e1c307488fd2da2b0a19f7199">   37</a></span>&#160;    <span class="keywordtype">long</span> <a class="code" href="class_gameloop.html#a301c183e1c307488fd2da2b0a19f7199">lastFrame</a>;</div>
<div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="class_gameloop.html#a9415733a7e81365c8b5b8ee5b1519ffb">   38</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_gameloop.html#a9415733a7e81365c8b5b8ee5b1519ffb">running</a>;</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;</div>
<div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="class_gameloop.html#ae2dd6353df16267b2e9cbc845118721e">   41</a></span>&#160;    <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">double</span> <a class="code" href="class_gameloop.html#ae2dd6353df16267b2e9cbc845118721e">FPS</a>;</div>
<div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="class_gameloop.html#ae4cbe1048a5e5f398271d0d998b45028">   42</a></span>&#160;    <span class="keyword">static</span> <span class="keywordtype">int</span> <a class="code" href="class_gameloop.html#ae4cbe1048a5e5f398271d0d998b45028">timer</a>;</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;</div>
<div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="class_gameloop.html#af40baffa9da33a7f8d4e480244d74e74">   45</a></span>&#160;    <a class="code" href="class_state_machine.html">StateMachine</a>* <a class="code" href="class_gameloop.html#af40baffa9da33a7f8d4e480244d74e74">currentState</a>;</div>
<div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="class_gameloop.html#a2a19e25d1250c978750fadfe74cfde57">   46</a></span>&#160;    <a class="code" href="class_state_manager.html">StateManager</a>* <a class="code" href="class_gameloop.html#a2a19e25d1250c978750fadfe74cfde57">manager</a>;</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    <span class="keywordtype">long</span> <a class="code" href="class_gameloop.html#a0004bb5d123525c760e16535c424d50b">getTime</a>();</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_gameloop.html#a91d555830ff70f604077ec1600bf9a90">stopLoop</a>();</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_gameloop.html#a363757057c85482cecc4f72da4084dba">update</a>();</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_gameloop.html#a6f65b70ec85e73fb4467e7eb34bc4849">render</a>(<span class="keywordtype">float</span> interpolation);</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_gameloop.html#a1fc46b06b36562f628e0d8f051c8b596">handleInput</a>();</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_gameloop.html#a7c190e11c2ed38b078519efe7e4d06d2">changeState</a>(<a class="code" href="class_state_machine.html">StateMachine</a>* level);</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;};</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* GAMELOOP_H_ */</span><span class="preprocessor"></span></div>
<div class="ttc" id="class_state_machine_html"><div class="ttname"><a href="class_state_machine.html">StateMachine</a></div><div class="ttdef"><b>Definition:</b> <a href="_state_machine_8h_source.html#l00014">StateMachine.h:14</a></div></div>
<div class="ttc" id="class_gameloop_html_ae4cbe1048a5e5f398271d0d998b45028"><div class="ttname"><a href="class_gameloop.html#ae4cbe1048a5e5f398271d0d998b45028">Gameloop::timer</a></div><div class="ttdeci">static int timer</div><div class="ttdef"><b>Definition:</b> <a href="_gameloop_8h_source.html#l00042">Gameloop.h:42</a></div></div>
<div class="ttc" id="class_window_html"><div class="ttname"><a href="class_window.html">Window</a></div><div class="ttdef"><b>Definition:</b> <a href="_window_8h_source.html#l00011">Window.h:11</a></div></div>
<div class="ttc" id="class_gameloop_html_a7c190e11c2ed38b078519efe7e4d06d2"><div class="ttname"><a href="class_gameloop.html#a7c190e11c2ed38b078519efe7e4d06d2">Gameloop::changeState</a></div><div class="ttdeci">void changeState(StateMachine *level)</div><div class="ttdef"><b>Definition:</b> <a href="_gameloop_8cpp_source.html#l00133">Gameloop.cpp:133</a></div></div>
<div class="ttc" id="class_gameloop_html_a2a19e25d1250c978750fadfe74cfde57"><div class="ttname"><a href="class_gameloop.html#a2a19e25d1250c978750fadfe74cfde57">Gameloop::manager</a></div><div class="ttdeci">StateManager * manager</div><div class="ttdef"><b>Definition:</b> <a href="_gameloop_8h_source.html#l00046">Gameloop.h:46</a></div></div>
<div class="ttc" id="class_gameloop_html_a91d555830ff70f604077ec1600bf9a90"><div class="ttname"><a href="class_gameloop.html#a91d555830ff70f604077ec1600bf9a90">Gameloop::stopLoop</a></div><div class="ttdeci">void stopLoop()</div><div class="ttdef"><b>Definition:</b> <a href="_gameloop_8cpp_source.html#l00097">Gameloop.cpp:97</a></div></div>
<div class="ttc" id="class_gameloop_html_af40baffa9da33a7f8d4e480244d74e74"><div class="ttname"><a href="class_gameloop.html#af40baffa9da33a7f8d4e480244d74e74">Gameloop::currentState</a></div><div class="ttdeci">StateMachine * currentState</div><div class="ttdef"><b>Definition:</b> <a href="_gameloop_8h_source.html#l00045">Gameloop.h:45</a></div></div>
<div class="ttc" id="class_state_manager_html"><div class="ttname"><a href="class_state_manager.html">StateManager</a></div><div class="ttdef"><b>Definition:</b> <a href="_state_manager_8h_source.html#l00015">StateManager.h:15</a></div></div>
<div class="ttc" id="class_gameloop_html_aaf57f38f17343877c7b4bd6a75ef3a9f"><div class="ttname"><a href="class_gameloop.html#aaf57f38f17343877c7b4bd6a75ef3a9f">Gameloop::gameLoop</a></div><div class="ttdeci">void gameLoop()</div><div class="ttdef"><b>Definition:</b> <a href="_gameloop_8cpp_source.html#l00040">Gameloop.cpp:40</a></div></div>
<div class="ttc" id="_load_shader_8h_html"><div class="ttname"><a href="_load_shader_8h.html">LoadShader.h</a></div></div>
<div class="ttc" id="class_gameloop_html_a18f9a1686565e206b40718ed787aeb97"><div class="ttname"><a href="class_gameloop.html#a18f9a1686565e206b40718ed787aeb97">Gameloop::Gameloop</a></div><div class="ttdeci">Gameloop()</div><div class="ttdef"><b>Definition:</b> <a href="_gameloop_8cpp_source.html#l00020">Gameloop.cpp:20</a></div></div>
<div class="ttc" id="_window_8h_html"><div class="ttname"><a href="_window_8h.html">Window.h</a></div></div>
<div class="ttc" id="class_gameloop_html_ae2dd6353df16267b2e9cbc845118721e"><div class="ttname"><a href="class_gameloop.html#ae2dd6353df16267b2e9cbc845118721e">Gameloop::FPS</a></div><div class="ttdeci">static const double FPS</div><div class="ttdef"><b>Definition:</b> <a href="_gameloop_8h_source.html#l00041">Gameloop.h:41</a></div></div>
<div class="ttc" id="class_gameloop_html_ac0aff9533f00b23557a7d7b348b95007"><div class="ttname"><a href="class_gameloop.html#ac0aff9533f00b23557a7d7b348b95007">Gameloop::~Gameloop</a></div><div class="ttdeci">virtual ~Gameloop()</div><div class="ttdef"><b>Definition:</b> <a href="_gameloop_8cpp_source.html#l00033">Gameloop.cpp:33</a></div></div>
<div class="ttc" id="class_gameloop_html_a0004bb5d123525c760e16535c424d50b"><div class="ttname"><a href="class_gameloop.html#a0004bb5d123525c760e16535c424d50b">Gameloop::getTime</a></div><div class="ttdeci">long getTime()</div><div class="ttdef"><b>Definition:</b> <a href="_gameloop_8cpp_source.html#l00091">Gameloop.cpp:91</a></div></div>
<div class="ttc" id="class_gameloop_html_a301c183e1c307488fd2da2b0a19f7199"><div class="ttname"><a href="class_gameloop.html#a301c183e1c307488fd2da2b0a19f7199">Gameloop::lastFrame</a></div><div class="ttdeci">long lastFrame</div><div class="ttdef"><b>Definition:</b> <a href="_gameloop_8h_source.html#l00037">Gameloop.h:37</a></div></div>
<div class="ttc" id="class_gameloop_html_abf8e7512d69339437c10cfb24be80de2"><div class="ttname"><a href="class_gameloop.html#abf8e7512d69339437c10cfb24be80de2">Gameloop::window</a></div><div class="ttdeci">Window * window</div><div class="ttdef"><b>Definition:</b> <a href="_gameloop_8h_source.html#l00034">Gameloop.h:34</a></div></div>
<div class="ttc" id="class_gameloop_html_a6f65b70ec85e73fb4467e7eb34bc4849"><div class="ttname"><a href="class_gameloop.html#a6f65b70ec85e73fb4467e7eb34bc4849">Gameloop::render</a></div><div class="ttdeci">void render(float interpolation)</div><div class="ttdef"><b>Definition:</b> <a href="_gameloop_8cpp_source.html#l00102">Gameloop.cpp:102</a></div></div>
<div class="ttc" id="_state_manager_8h_html"><div class="ttname"><a href="_state_manager_8h.html">StateManager.h</a></div></div>
<div class="ttc" id="class_gameloop_html_a363757057c85482cecc4f72da4084dba"><div class="ttname"><a href="class_gameloop.html#a363757057c85482cecc4f72da4084dba">Gameloop::update</a></div><div class="ttdeci">void update()</div><div class="ttdef"><b>Definition:</b> <a href="_gameloop_8cpp_source.html#l00115">Gameloop.cpp:115</a></div></div>
<div class="ttc" id="class_gameloop_html_a9415733a7e81365c8b5b8ee5b1519ffb"><div class="ttname"><a href="class_gameloop.html#a9415733a7e81365c8b5b8ee5b1519ffb">Gameloop::running</a></div><div class="ttdeci">bool running</div><div class="ttdef"><b>Definition:</b> <a href="_gameloop_8h_source.html#l00038">Gameloop.h:38</a></div></div>
<div class="ttc" id="class_gameloop_html"><div class="ttname"><a href="class_gameloop.html">Gameloop</a></div><div class="ttdef"><b>Definition:</b> <a href="_gameloop_8h_source.html#l00023">Gameloop.h:23</a></div></div>
<div class="ttc" id="_state_machine_8h_html"><div class="ttname"><a href="_state_machine_8h.html">StateMachine.h</a></div></div>
<div class="ttc" id="class_gameloop_html_a1fc46b06b36562f628e0d8f051c8b596"><div class="ttname"><a href="class_gameloop.html#a1fc46b06b36562f628e0d8f051c8b596">Gameloop::handleInput</a></div><div class="ttdeci">void handleInput()</div><div class="ttdef"><b>Definition:</b> <a href="_gameloop_8cpp_source.html#l00125">Gameloop.cpp:125</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_019651478e64fa8531e8b52ba72014e7.html">CoreSystems</a></li><li class="navelem"><a class="el" href="_gameloop_8h.html">Gameloop.h</a></li>
    <li class="footer">Generated on Fri Dec 13 2013 19:38:39 for GameEngine by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.5 </li>
  </ul>
</div>
</body>
</html>
